openFrameworks Essentials by Denis Perevalov

openFrameworks Essentials by Denis Perevalov

Author:Denis Perevalov
Language: eng
Format: epub
Publisher: Packt Publishing


Run the project and change the rad, deform, and deformFreq sliders. You will find that rad sets the radius of the sphere, and deform and deformFreq control the amount and space frequency of deformation. The sphere will be deformed, as shown in the following screenshot:

This shows a deformed sphere

Note that we don't update normals, so normals keep their values as they are set for an undeformed sphere. Thus, for a deformed sphere, these values of normals are not exactly perpendicular to the surface, and so lighting is not perfect. Nevertheless, the result we obtained is pretty nice for our purposes.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.